﻿using System;
using System.IO;
using System.Net;
using AgNet.Helpers;
using AgNet.Models;
using Newtonsoft.Json;
using RestSharp;
using RestSharp.Deserializers;

namespace AgNet
{
    public partial class AgNetClient
    {
        private const string ApiBaseUrl = "https://www.audiogalaxy.com";

        private const string Version = "v1.0";
    
        private string clientId;
        private string appSecret;

        private RestClient restClient;
        private RequestHelper requestHelper;
        
        public AgNetClient(string clientId, string appSecret)
        {
            this.clientId = clientId;
            this.appSecret = appSecret;
            
            this.restClient = new RestClient(ApiBaseUrl);
            this.restClient.ClearHandlers();
            this.restClient.AddHandler("*", new JsonDeserializer());

            this.requestHelper = new RequestHelper(Version);
        }
    }
}
